package com.xbongbong.parent.interfaces;

import com.xbongbong.paas.domain.entity.ext.PaasFormEntityExt;
import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.parent.pojo.list.ButtonPermissionPojo;
import com.xbongbong.parent.pojo.list.FieldListPojo;
import com.xbongbong.parent.pojo.list.WorkReportAnalysisVO;
import com.xbongbong.pro.formexplain.pojo.HandleExplainPojo;
import com.xbongbong.pro.weblist.pojo.WorkReportPojo;
import com.xbongbong.pro.weblist.pojo.dto.WorkReportListDTO;
import com.xbongbong.pro.weblist.pojo.vo.WorkReportVO;

import java.util.List;

/**
 * @author sunshaoxiang
 * @ClassName WorkReportCommunicateListService
 * @Description 工作报告列表接口
 * @Date 2022/6/7 16:11
 * @Version 1.0
 **/
public interface WorkReportCommunicateListService {

    /**
     * 获取表单
     * @param formId
     * @param corpid
     * @return
     * @throws XbbException
     */
    PaasFormEntityExt getForm(Long formId, String corpid) throws XbbException;

    /**
     * 获取访客计划的列表数据
     * @param workReportListDTO
     * @return
     * @throws XbbException
     */
    WorkReportVO list(WorkReportListDTO workReportListDTO) throws XbbException;

    /**
     * 获取并封装解释
     * @param fieldListPojo
     * @return
     * @throws XbbException
     */
    HandleExplainPojo getExplain(FieldListPojo fieldListPojo) throws XbbException;

    /**
     * 获取并解析数据
     * @param workReportListDTO
     * @return
     * @throws XbbException
     */
    WorkReportAnalysisVO getData(WorkReportListDTO workReportListDTO) throws XbbException;

    /**
     * 权限校验
     * @param workReportListDTO
     */
    void checkPermission(WorkReportListDTO workReportListDTO) throws XbbException;

    /**
     * 封装返回给前端的VO对象
     * @param workReportPojoList
     * @param totalElements
     * @param page
     * @param pageSize
     * @param buttonPermissionPojo
     * @return
     */
    WorkReportVO getReturnVO(List<WorkReportPojo> workReportPojoList, long totalElements, Integer page, Integer pageSize, ButtonPermissionPojo buttonPermissionPojo);
}
